package it.sauronsoftware.jave;

import java.io.IOException;

/**
 * @author tanghc
 * @date 18/6/27
 */
public class JaveTest {
    public static void main(String[] args) throws IOException {
//        DefaultFFMPEGLocator defaultFFMPEGLocator = new DefaultFFMPEGLocator();
//        FFMPEGExecutor executor = defaultFFMPEGLocator.createExecutor();
        FFMPEGExecutor executor = new FFMPEGExecutor("/usr/local/Cellar/ffmpeg/4.0.1/bin/ffmpeg");
        executor.addArgument("-i ");
        executor.addArgument("/opt/data/v1.mp4");
        executor.addArgument("-vf \"drawtext=fontfile=simhei.ttf: text='雷':x=100:y=10:fontsize=24:fontcolor=yellow:shadowy=2 [out]\"");
        executor.addArgument("/opt/data/v2.mp4");
        executor.execute();

    }
}
